package com.example.zxmzy.entity;

import com.example.zxmzy.R;

public class Sp {
    private String id;
    private String name;
    private String title;
    private String kind;
    private String price;
    private int pic;

    public Sp() {
        this.id="-1";
    }

    public Sp(String name, String title, String kind , String price ) {
        this.id = "id";
        this.name = name;
        this.title = title;
        this.kind = kind;
        this.price = price;
        this.pic = 0;
    }


    public Sp(String id, String name, String title, String kind, String price) {
        this.id = id;
        this.name = name;
        this.title = title;
        this.kind = kind;
        this.price = price;
        switch (name){
            case "便当袋":
                this.pic= R.drawable.sq_bdd;
                break;
            case "卡通水杯":
                this.pic=R.drawable.sq_ktsb;
                break;
            case "化妆镜":
                this.pic=R.drawable.sq_hzj;
                break;
            case "花朵风扇":
                this.pic=R.drawable.sq_hdfs;
                break;
            case "丑鱼钥匙扣":
                this.pic=R.drawable.sq_cyys;
                break;
            case "洞洞鞋配件":
                this.pic=R.drawable.sq_ddxps;
                break;
            default:
                this.pic=R.drawable.iq_wm;
                break;
        }
    }

    @Override
    public String toString() {
        return "Stuff{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", title='" + title + '\'' +
                ", kind='" + kind + '\'' +
                ", price='" + price + '\'' +
                ", pic=" + pic +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }
    public String getKind() {return kind;}
    public void setKind(String kind) {this.kind = kind;}
    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public int getPic() {
        return pic;
    }

    public void setPic(int pic) {
        this.pic = pic;
    }
}
